/* 
  需要等待异步数据加载完成，才能调用
*/
export default function useArticleList(cateId) {

  const getArticleList = async (id) => {
    const data= await getArticleListFromLocal(id)
    return data
  }

  async function getArticleListFromLocal(id) {
    const data = await import(`../../../_data~/cateArticleList/${id}.json`)
    return data.default
  }

  return getArticleList(cateId)
}